﻿package com.tudou.track
{
    import com.tudou.config.*;
    import flash.net.*;

    public class ErrorReportTracker extends Object
    {
        public static const CAN_NOT_PLAY_V2_CROSSDOMAIN_ERROR:int = 10;
        public static const VIDEO_ERROR:int = 1812;
        public static const ADCONTROL_SECURITY_ERROR:int = 1809;
        public static const ADPLAY_SECURITY_ERROR:int = 1811;
        public static const CAN_NOT_PLAY_V2_ERROR:int = 20;
        public static const ADPLAY_IOERROR:int = 1810;
        public static const V2_IOERROR:int = 1805;
        public static const STREAM_BREAK:int = 1821;
        public static const CAN_NOT_PLAY_NO_URL:int = 50;
        public static const CAN_NOT_PLAY_PARSE_XML_ERROR:int = 30;
        public static const CAN_NOT_PLAY_USE_UP_ALL_URLS:int = 40;
        public static const V2_CACHE_ERROR:int = 1801;
        public static const V2_SECURITY_ERROR:int = 1808;
        public static const CAN_NOT_PLAY:int = 1820;
        public static const ADCONTROL_IOERROR:int = 1806;

        public function ErrorReportTracker()
        {
            return;
        }// end function

        public static function send(param1:int, param2:int, param3:String, param4:int = 0) : void
        {
            var _loc_5:* = Config.ERROR_REPORT_URL;
            _loc_5 = Config.ERROR_REPORT_URL + ("?category=" + param2);
            _loc_5 = _loc_5 + ("&type=" + param4);
            _loc_5 = _loc_5 + ("&object_id=" + param1);
            _loc_5 = _loc_5 + ("&message=" + param3);
            var _loc_6:* = new URLRequest(_loc_5);
            sendToURL(_loc_6);
            return;
        }// end function

    }
}
